﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using XMK.Framework.Model;
using XMK.Tadong.Biz;
using XMK.Tadong.Model.Cond;

namespace XMK.Tadong.ServiceWeb.Handlers
{
    public partial class LoginHandler : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string userID = Request.Form["uid"];
            string pwd = Request.Form["p"];

            Base_LoginCond loginCond = new Base_LoginCond
            {
                name = userID,
                pwd = pwd.ToUpper()
            };

            Base_RM_UserInfoBiz userBiz = new Base_RM_UserInfoBiz();

            ResponseInfo responseInfo = userBiz.GetUserInfoByNamePassword(loginCond);

            if (responseInfo.Data != null)
            {
                Response.Write("{\"result\":true}");
            }
            else
            {
                Response.Write("{\"result\":false}");
            }
            Response.End();
        }
    }
}